﻿<!--BitAdmin2.0框架文件-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>BitAdminCore-支付示例</title>
    <meta name="description" content="BitAdminCore, Version 1.0, Alpha" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

    <link href="../../lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
    <script src="../../lib/jquery/dist/jquery.min.js"></script>
    <script src="../../lib/bootstrap/dist/js/bootstrap.min.js"></script>
    <style>
        .row {
            margin: 5px;
        }
    </style>
</head>
<body>
    <h2 style="margin-left:20px;">暂时没有测试账号，后续完善</h2>
    <div class="col-md-5">
        <div class="row">
            <h4>微信支付（Native:扫码支付）：</h4>
            生成订单支付二维码，通过微信扫码支付。
        </div>
        <div class="row">
            <a href="javascript:void(1);" class="btn btn-success native1">Native扫码支付（模式一）</a>
        </div>
        <div class="row">
            <a href="javascript:void(1);" class="btn btn-success native2">Native扫码支付（模式二）</a>
        </div>
        <div class="row">
            <h4>微信支付（MicroPay:刷卡支付）：</h4>
            用户出示支付码，商家扫码枪扫码支付。
        </div>
        <div class="row">
            <a href="javascript:void(1);" class="btn btn-success">MicroPay刷卡支付</a>
        </div>
        <div class="row">
            <h4>微信支付（JsApi:公众号支付）：</h4>
            微信浏览器，通过JsApi发起支付。
        </div>
        <div class="row">
            <a href="javascript:void(1);" class="btn btn-success">JsApi公众号支付</a>
        </div>
        <div class="row">

        </div>
    </div>
    <div class="col-md-7">
        <img style="width:300px;height:300px;" src="../../qrcode/encode" />
    </div>
    <script>
        $(function () {
            $(".native1").click(function () {
                $.get("../../Pay/NativePayOne?productId=123", function (result) {
                    console.log(result);
                    $("img").attr("src", "../../qrcode/encode/?msg=" + result.msg);
                });
            });
            $(".native2").click(function () {
                $.get("../../Pay/NativePayTow", {
                    productId: "id",
                    body: "商品信息",
                    attach: "附加信息",
                    goods_tag: "不知道啥",
                    total_fee: "0.01"
                }, function (result) {
                    console.log(result);
                    $("img").attr("src", result.msg);
                });
            });

        });
    </script>
</body>
</html>